﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="NewSaleOrder.aspx.cs" Inherits="Sale_NewSaleOrder" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script language="javascript" type="text/javascript">
// <!CDATA[

function headtab_onclick() {

}

// ]]>
</script>

<table width="100%" border="1" >
    <tr>
        <td>
            <table id="headtab" width="100%" onclick="return headtab_onclick()">
                <tr>
                    <td colspan="6"><font color="red">注意:在录入或修改完成后，务必先要选择“保存销售订单”按钮，然后再关闭本页面 </font>  </td>
                </tr>
                <tr>
                    <td align="right">
                        时间:</td><td><asp:TextBox ID="TextBoxDate" runat="server"></asp:TextBox> 
                            <span style="color: #ff0000">*</span></td>
                    <td align="right">
                        订 单 号:</td><td><asp:TextBox ID="TextBoxNumber" runat="server"></asp:TextBox> 
                            <span style="color: #ff0000">*</span></td>
                    <td align="right">
                        总金额:</td><td><asp:TextBox ID="TextBoxSum" runat="server" Enabled="false"></asp:TextBox></td>
                </tr>
                <tr>
                    <td align="right">客户姓名:</td><td><asp:TextBox ID="TextBoxCustomer" runat="server"></asp:TextBox>     
                        <span style="color: #ff0000">*</span></td>
                    <td align="right">销售人员:</td><td><asp:TextBox ID="TextBoxSaler" runat="server"></asp:TextBox>
                        <span style="color: #ff0000">*</span></td>
                    
                </tr>
                <tr>
                     <td align="right" >
                         备注:</td><td colspan="5"><asp:TextBox ID="TextBoxComment" runat="server" Width="580px"></asp:TextBox></td>

                </tr>
                <tr>
                     <td colspan="6">
                         <asp:Button ID="ButtonAddNewRow" runat="server" Text="新增一行明细" OnClick="ButtonAddNewRow_Click" />
                         <asp:Button ID="ButtonSave" runat="server" Text="保存销售订单" OnClick="ButtonSave_Click" Font-Bold="True" />
                         <asp:Button ID="ButtonCancel" runat="server" Text="关闭销售订单" OnClick="ButtonCancel_Click" />
                     </td>

                </tr>
                <tr>
                    <td colspan="6"><asp:Label ID="LabelError" runat="server" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
            </table>
            
        </td>
    </tr>
    <tr>
        <td>
            <table id = "detailtab" width="100%">
                <tr>
                    <td style="width:50%">
                                                        <asp:GridView ID="GridViewDetail" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Vertical" OnRowCommand="GridViewDetail_RowCommand" >
                                    <EmptyDataTemplate>
                                        <table id="ctl00_ContentPlaceHolder1_GridViewDetail" border="1" cellpadding="4" cellspacing="0"
                                            rules="cols" style="border-top-width: 1px; border-left-width: 1px; border-left-color: #dedfde;
                                            border-bottom-width: 1px; border-bottom-color: #dedfde; color: black; border-top-color: #dedfde;
                                            border-collapse: collapse; background-color: white; border-right-width: 1px;
                                            border-right-color: #dedfde">
                                            <tr style="font-weight: bold; color: white; background-color: #6b696b">
                                                <th scope="col">
                                                    产品名称</th>
                                                <th scope="col">
                                                    产品型号</th>
                                                <th scope="col">
                                                    产品颜色</th>
                                                <th scope="col">
                                                    产品编码</th>
                                                <th scope="col">
                                                    数量</th>
                                                <th scope="col">
                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
                                                <th scope="col">
                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
                                            </tr>
                                            <tr style="background-color: #f7f7de">
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                    </EmptyDataTemplate>
                                    <FooterStyle BackColor="#CCCC99" />
                                    <Columns>
                                        <asp:BoundField DataField="ProductID" Visible="False" />
                                        <asp:BoundField DataField="ProductName" HeaderText="产品名称" ReadOnly="True" />
                                        <asp:BoundField DataField="ProductModule" HeaderText="产品型号" ReadOnly="True" />
                                        <asp:BoundField DataField="ProductColor" HeaderText="产品颜色" ReadOnly="True" />
                                        <asp:BoundField DataField="ProductCode" HeaderText="产品编码" ReadOnly="True" />
                                        <asp:BoundField DataField="Price" HeaderText="价格" ReadOnly="True" />
                                        <asp:BoundField DataField="Quantity" HeaderText="数量" ReadOnly="True" />
                                        <asp:ButtonField ButtonType="Button" CommandName="EditItem" Text="修改" />
                                        <asp:ButtonField ButtonType="Button" CommandName="DeleteItem" Text="删除" />
                                    </Columns>
                                    <RowStyle BackColor="#F7F7DE" />
                                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                                    <AlternatingRowStyle BackColor="White" />
                                </asp:GridView>

                    </td>
                    <td style="width:50%">
                        <table id="editarea" width="100%">
                            <thead>详细信息</thead><tr>
                                <td>产品编码</td><td> <asp:TextBox ID="TextBoxProductCode" runat="server"/>
                                    <font color="red" >*</font></td>
                            </tr>
                            <tr>    
                                <td>价格</td><td> <asp:TextBox ID="TextBoxItemPrice" runat="server"/>
                                    <span style="color: #ff0000">*</span></td>
                            </tr>
                            <tr>
                                <td>数量</td><td> <asp:TextBox ID="TextBoxItemNumber" runat="server"/> 
                                    <span style="color: #ff0000">*</span></td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                   <asp:Button ID="ButtonItemSaveandNew" runat="server" Text="保存并继续新增" OnClick="ButtonItemSaveandNew_Click" />
                                   <asp:Button ID="ButtonItemSave" runat="server" Text="保存" OnClick="ButtonItemSave_Click" />&nbsp;
                                    <asp:Button ID="ButtonItemCancel" runat="server" Text="取消" />
                                    <asp:HiddenField ID="HiddenFieldProductID" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>

</asp:Content>

